package com.lujianfei.mqtt.login.mvvm

import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent
import retrofit2.Retrofit
import javax.inject.Singleton

/**
 * @Author: wn
 * @Date: 2024/4/15 16:17
 * @Description: 提供 LoginService 实例
 */
@Module
@InstallIn(SingletonComponent::class)
object LoginApiModule {
  // 提供 LoginService 实例
  @Singleton
  @Provides
  fun provideLoginAPI(retrofit: Retrofit): LoginService =
    retrofit.create(LoginService::class.java)
}